﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Input;

namespace LP2
{

    /*Esta clase es usada para cargar los datos predefinidos por el desarrollador
     * como HP,hit,masa para cada tipo de aliado y enemigo
     * 
    /*/

    public class CreaturePropertyConfig
    {
         List<int> AllyHP;
         List<int> AllyHIT;
         List<double> AllyMASA;

         List<int> EnemyHP;
         List<double> EnemyMASA;


         public CreaturePropertyConfig()
         {

             AllyHP = new List<int>();
             AllyHIT = new List<int>();
             AllyMASA = new List<double>();
             EnemyHP = new List<int>();
             EnemyMASA = new List<double>();
         }

         public void agregarListasAlly(int hp,int hit,double masa)
         {
             AllyHP.Add(hp);
             AllyHIT.Add(hit);
             AllyMASA.Add(masa);
         }

         public void agregarListasEnemy(int hp,double masa)
         {
             EnemyHP.Add(hp);
             EnemyMASA.Add(masa);

         }

         public List<double> getEnemyMASAList()
         {
             return this.EnemyMASA;
         }

         public List<int> getAllyHPList()
         {
             return this.AllyHP;
         }

         public List<int> getAllyHITList()
         {
             return this.AllyHIT;
         }

         public List<double> getAllyMASAList()
         {
             return this.AllyMASA;
         }


         public List<int> getEnemyHPList()
         {
             return this.EnemyHP;

         }
         public void loadCreaturePropertyConfig(String valueXML)
         {
             String[] values;
                 values = valueXML.Split('/');

                 if (values[0] == "A")
                     agregarListasAlly(Convert.ToInt32(values[1]), Convert.ToInt32(values[2]), Convert.ToDouble(values[3]));
                 else
                     agregarListasEnemy(Convert.ToInt32(values[1]),Convert.ToDouble(values[2]));

          
         }

    }
}
